﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MinAndMaksOfASequence
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] sequence = new int[N];
            for (int index = 0; index < N; index++)
            {
                sequence[index] = int.Parse(Console.ReadLine());
            }
            int currentMin = int.MaxValue;
            int currentMax = int.MinValue;

            for (int index = 0; index < N; index++)
            {
                if (currentMax < sequence[index])
                {
                    currentMax = sequence[index];
                }
                if (currentMin > sequence[index])
                {
                    currentMin = sequence[index];
                }
            }
            Console.WriteLine("The minimal elements is {0} and the Biggest number is {1}", currentMin, currentMax);
        }
    }
}
